]> dgit.raspbian.org Git - gnome-shell.git/commit
st/theme: Remove entry from files_by_stylesheet after emitting signal
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 11 May 2020 18:41:37 +0000 (20:41 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 21 May 2020 20:59:35 +0000 (20:59 +0000)
commit0f947d4ff99e220fbc91e64a10511f5ebc69d06e
tree51fc188999da4ec6436b8e96255bbc105c344dc6
parent9dc421875ba43993c4c2bb41a4f5881b61ea73f7
st/theme: Remove entry from files_by_stylesheet after emitting signal

Since e06109c23ce2a6dd53d32c26a89ab46a952d7373 we keep old theme nodes
valid during the emission of the "custom-stylesheets-changed" signal.

It turns out that we might still look up the file of a stylesheet using
the files_by_stylesheet hashtable during the emission of that signal,
causing a crash because the assertion in _st_theme_resolve_url() fails.

So fix that and remove the stylesheet entry from the files_by_stylesheet
hashtable after emitting the "custom-stylesheets-changed" signal. And to
be consistent, also remove the entry from the stylesheets_by_file
hashtable after emitting the signal.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2757
src/st/st-theme.c